<%@ page language="java" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html>
<html>
<head>
<base href="<%=basePath%>">
<meta charset=UTF-8">
<title>数据显示页面</title>
<link rel="stylesheet" type="text/css" href="themes/black/easyui.css">
<link rel="stylesheet" type="text/css" href="themes/icon.css">
<link rel="stylesheet" type="text/css" href="themes/color.css">
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.easyui.min.js"></script>
<script type="text/javascript" src="js/easyui-lang-zh_CN.js"></script>

<style type="text/css">
html, body {
	width: 100%;
	height: 100%;
	margin: 0px;
	padding: 0px;
}
</style>

<script type="text/javascript">
	$(function(){
		$("#methodTree").tree({
			url : "user/loadMenu.do",
			onClick: function(node){
				if(node.attributes.url){
					if($("#tabs").tabs('exists',node.text)){
						
						$("#tabs").tabs('select',node.text)
					}else{
						//选择要链接的路径页面
						var pageContent="<iframe frameborder=0 scrolling='auto' style='width:100%;height:100%' src="+node.attributes.url+"></iframe>"
						$("#tabs").tabs('add',{
							title:node.text,
							closable:true,
							fit:true,
							content:pageContent
						});
					}
				}
			}
		});
	});
</script>

</head>
<body>
	<div class="easyui-layout" style="width: 100%; height: 100%;">
		<div data-options="region:'north'" style="height: 50px"></div>
		<div data-options="region:'south',split:true" style="height: 50px;"></div>
		<div data-options="region:'west',split:true" title="功能展示"style="width: 200px;">
				<ul id="methodTree"></ul>
		</div>
		<div data-options="region:'center',title:'数据展示',iconCls:'icon-ok',split:true">
			<div id="tabs" class="easyui-tabs" style="width: 100%;height: 100%">
				<div title="首页" data-options="closable:true,fit:true">
					<h1>欢迎使用</h1>
				</div>
			</div>
		</div>
	</div>
</body>
</html>